<template>
  <!-- 消息详情 -->
  <div class="information_details">
    <!-- 顶部导航 -->
    <van-nav-bar left-arrow title="消息详情" @click-left="fanhui(content)" />

    <div class="xiangqing">
      <van-cell
        :title="content.title"
        :value="content.createTime"
        :label="`发布人: ${content.sourceName}`"
      />
      <ul>
        <li>{{ content.msgDate }}</li>
      </ul>
    </div>
  </div>
</template>

<script>
import { GetParticularsInformation, GetReads } from "@/request/api";
export default {
  data() {
    return {
      content: [],
    };
  },
  methods: {
    fanhui(con) {
      if (con.isReader == 1) {
        // console.log(String(con.id));
        GetReads(String(con.id)).then((res) => {
          // console.log(res);
        });
      }

      this.$router.go(-1);
    },
  },
  created() {
    GetParticularsInformation(this.$route.query.info).then((res) => {
      this.content = res.data;
      //   console.log(this.content);
    });
  },
};
</script>
 
<style lang = "less" scoped>
/* 整个组件 */
.information_details {
  .van-hairline--bottom {
    background-color: #003399;
  }
  /deep/.van-nav-bar__title,
  /deep/.van-icon {
    color: #ffffff;
  }
  /* 信息内容 */
  .xiangqing {
    background-color: #fff;
    margin-top: 0.1rem;
    .van-cell {
      padding: 0.1rem 0.16rem 0.2rem;
    }
    ul {
      font-size: 0.14rem;
      padding: 0.2rem 0.16rem 0.25rem;
      color: #666;
      line-height: 0.2rem;
    }
  }
}
</style>